<template>
  <div>
    <div class="title">限时免费</div>
    <div class="body">
      <van-swipe class="my-swipe" :show-indicators="false"  indicator-color="white">
  <van-swipe-item class="free-item" v-for="(item,index) in limtedList" :key="index">
    <albumCard v-for="free in item" :key="free.id" :item2="free" :type="2"></albumCard>
  </van-swipe-item>

</van-swipe>
    </div>
  </div>
</template>

<script setup lang="ts">
import { limitedFreeItem } from '../../../api/home/type';
import albumCard from './album-card.vue';
import {splitArray} from '../../../utils/splitArray'
import { computed} from 'vue';
let props=defineProps<{
  limtedFreeList:limitedFreeItem[]
}>();
let limtedList=computed(()=>{  
  return splitArray(props.limtedFreeList);
})


</script>

<style lang="less" scoped>
.title{
  font-size: 18px;
  color: #40404c;
  line-height: 25px;
  margin: 17px 0 17px 15px;
  font-weight: 700;
}
.free-item{
  display: flex;
  justify-content: space-evenly;
}
</style>